package com.ujoin.action.collection;

import org.springframework.beans.factory.annotation.Autowired;

import com.ujoin.bean.Collection;
import com.ujoin.service.CollectionService;
import com.ujoin.util.ActionEnhanced;

public class FindCollectionByUserIdAction extends ActionEnhanced {

	private int userId;
	
	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	@Autowired
	private CollectionService collectionService;
	
	@Override
	public String execute() {
		setJson(collectionService.findCollectionByUserId(userId));
		return SUCCESS;
	}
}
